import {
  HomeOutlined,
} from '@ant-design/icons'
import $axios from '@/utils/axios';
import BIPAGE from "../pages/biView";

const getMenu = (params)=>{
  return $axios.get('/dm/api/sys/menu/tree',params)
}
const getMenuList = (params)=>{
  return $axios.get('/dm/api/sys/menu/list',params)
}
const menus = [
  {
    path: '/',
    name: '首页',
    key: 'home',
    icon: HomeOutlined,
    iconfont:'icon-pfshouye',
    routes: []
  },
  {
    path: '/admin/cleanFusion',
    name: '清洗融合',
    exact: true,
    key: 'cleanFusion',
    type: 'subMenu',
    icon: HomeOutlined,
    iconfont:'icon-pfxinyongzhibiaoguanli',
    routes:[
      {
        path: '/admin/cleanFusion/cleanRole',
        name: '清洗规则管理',
        key: 'cleanfusion:cleanrole:view',
      },
      {
        path: '/admin/cleanFusion/dataIntegration',
        name: '数据集成管理',
        key: 'cleanfusion:dataintegration:view',
      },
      {
        path: '/admin/cleanFusion/dataTemplate',
        name: '数据模板',
        key: 'cleanfusion:datatemplate:view',
      },
    ]
  },
  {
    path: '/admin/db',
    name: '数据库工具',
    exact: true,
    key: 'db',
    type: 'subMenu',
    icon: HomeOutlined,
    iconfont:'icon-pfxinyongzhibiaoguanli',
    routes:[
      {
        path: '/admin/db/datasource',
        name: '数据源',
        key: 'db:datasource:view',
      },
      {
        path: '/admin/db/db',
        name: '查询',
        key: 'db:db:view',
      },
      {
        path: '/admin/db/transfer',
        name: '传输任务',
        key: 'db:transfer:view',
      },
      {
        path: '/admin/db/catch',
        name: '捕获任务',
        key: 'db:catch:view',
      },

       {
        path: '/admin/db/load',
        name: '加载任务',
        key: 'db:load:view',
      },
      {
        path: '/admin/db/monitor',
        name: '监控',
        key: 'db:monitor:view',
      },
      // {
      //   path: '/admin/db/interface',
      //   name: '接口列表',
      //   key: 'db:interface',
      // },
      // {
      //   path: '/admin/db/transfer',
      //   name: '接口列表',
      //   key: 'db:transfer',
      // },
    ],
  },

  {
    path: '/admin/intetface',
    name: '接口管理',
    key: 'intetface',
    type: 'subMenu',
    icon: HomeOutlined,
    iconfont:'icon-pfxinyongzhibiaoguanli',
    routes: [
      {
        path: '/admin/intetface/list',
        name: '接口管理',
        key: 'intetface:list:view',
      },
    ]
  },
  {
    path: '/admin/data/gov',
    name: '数据治理',
    exact: true,
    key: 'data:gov',
    type: 'subMenu',
    icon: HomeOutlined,
    routes: [
      {
        path: '/admin/data/gov/sdx',
        name: 'SDX',
        key: 'data:gov:sdx',
        externalLink:'http://localhost:8099/#/admin/bi/my?iframe=true',

      },
      {
        path: '/admin/data/gov/sadp',
        name: 'SADP',
        key: 'data:gov:sadp',
        externalLink:'http://localhost:8099/#/admin/targetMan/list?iframe=true',

      },
    ]
  },
  {
    path: '/bi',
    name: 'BI报表',
    exact: true,
    key: 'bi',
    type: 'subMenu',
    icon: HomeOutlined,
    iconfont:'icon-pfxinyongzhibiaoguanli',
    routes: [
      {
        path: '/bi/my',
        name: '煤业系统报表',
        key: 'my:list:view',
      },
      {
        path: '/bi/jh',
        name: '焦化系统报表',
        key: 'jh:list:view',
      },
      {
        path: '/bi/cb',
        name: '焦化系统成本报表',
        key: 'cb:list:view',
      },
      {
        path: '/bi/gx',
        name: '供销系统报表',
        key: 'gx:list:view',
      },
    ]
  },
  {
    path: '/targetMan',
    name: '指标管理',
    exact: true,
    key: 'targetMan',
    type: 'subMenu',
    icon: HomeOutlined,
    iconfont:'icon-pfxinyongzhibiaoguanli',
    routes: [
      {
        path: '/targetMan/list',
        name: '指标定义',
        key: 'targetMan:list:view',
      },
    ]
  },
  {
    path: '/basicinfo',
    name: '基础信息',
    key: 'basicinfo',
    type: 'subMenu',
    icon: HomeOutlined,
    iconfont:'icon-pfjichuxinxi',
    routes: [
      {
        path: '/basicinfo/manRelation',
        name: '组织机构',
        key: 'basicinfo:manRelation',
      },
      {
        path: '/basicinfo/class',
        name: '指标类',
        key: 'basicinfo:class',
      }
    ]
  },
  {
    path: '/dataTool',
    name: '数据工具',
    key: 'dataTool',
    iconfont:'icon-dfjxtpgongju',
    type: 'subMenu',
    routes: [
      {
        path: '/dataTool/finebi',
        name: 'BI报表',
        key: 'dataTool:finebi',
      },
    ],
  },
  {
    path: '/sys',
    name: '系统设置',
    key: 'sys',
    type: 'subMenu',
    iconfont:'icon-pfshezhi',
    icon: HomeOutlined,
    routes: [
      {
        path: '/sys/user',
        name: '用户管理',
        key: 'user:list:view',
      },
      {
        path: '/sys/role',
        name: '角色列表',
        key: 'role:list:view',
      },
      {
        path: '/sys/auth',
        name: '权限管理',
        key: 'auth:list:view',
      },
      {
        path: '/sys/dirMan?type=5',
        name: '字典管理',
        key: 'dir:list:view',
      },
      {
        path: '/sys/menu',
        name: '菜单管理',
        key: 'menu:list:view',
      },
      // {
      //   path: '/sys/comp',
      //   name: '系统参数',
      //   key: 'sys:comp:set',
      // },
    ]
  },
]

export default menus


export {
  getMenu,
  getMenuList
}
